<?php $this->load->view('layout/header'); ?>
<div id="container">
    <!--查询表单开始-->
    <div id="DivQuery">
        <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
        </div>
        <div id="floatBox" class="floatBox">
            <div id="drag" class="title" onmousedown="DragDialog()">
                <h4>
                    查询</h4>
                <span>关闭</span></div>
            <div class="content">
                <form action="<?php echo site_url('survey/surveyitem').'/'.$info['surveyid'];?>" method="post">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                选项名称：
                            </td>
                            <td>
                                <input type="text" name="itemname">
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                选项类型：
                            </td>
                            <td>
                                <select name="typeid">
                                    <option value="-1">请选择</option>
                                    <option value="1">单选</option>
                                    <option value="2">多选</option>
                                    <option value="3">文本</option>
                                </select>
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                状态：
                            </td>
                            <td>
                            <span id="radIsClose">
                                <input id="radIsClose_0" type="radio" name="isclose" value="-1" checked="checked" /><label for="radIsClose_0">不限</label>
                                <input id="radIsClose_1" type="radio" name="isclose" value="0" /><label for="radIsClose_1">开放</label>
                                <input id="radIsClose_2" type="radio" name="isclose" value="1" /><label for="radIsClose_2">关闭</label>
                            </span>
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%"></td>
                            <td>
                                <input type="submit" value="查询" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnQuery&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Config.aspx&quot;, false, false))" id="btnQuery" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <!--查询表单结束-->
    <!--导航开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_nav">
        <tr>
            <td>
                调查选项管理&gt;管理列表(<span style="color: red;"><?php echo $info['surveyname']?></span>)
            </td>
        </tr>
    </table>
    <!--导航结束-->
    <!--操作选项开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
        <tr>
            <td>
                操作选项：
                <a href="<?php echo site_url('survey/surveyitem_add_new').'/'.$info['surveyid'];?>">添加调查选项</a>
                <a onclick="javascript:return checkEdit(this);" name="surveyitemid" href="javascript:;" src="<?php echo site_url('survey/surveyitem_add').'/';?>">修改调查选项</a>
                <a onclick="javascript:return checkDel(this);" name="surveyitemid" href="javascript:;" src="<?php echo site_url('survey/delete_item').'/'.$info['surveyid'].'/';?>">删除调查选项</a>
                <a onclick="javascript:return checkOperate(this);" name="surveyitemid" src="<?php echo site_url('survey/edit_close_item/').'/'.$info['surveyid'].'/0/'?>" id="lbtnOpen" href="javascript:;)">批量开放</a>
                <a onclick="javascript:return checkOperate(this);" name="surveyitemid" src="<?php echo site_url('survey/edit_close_item/').'/'.$info['surveyid'].'/1/'?>" id="lbtnClose" href="javascript:;)">批量关闭</a>
                <?php if($filter == 0){ ?>
                    <a href="javascript:SearchDialog()">查询调查选项</a>
                <?php }else{ ?>
                    <a href="<?php echo site_url('survey/surveyitem').'/'.$info['surveyid'];?>">撤销查询</a>
                <?php } ?>
                <a href="<?php echo site_url('survey/index')?>">返回调查列表</a>
            </td>
        </tr>
    </table>
    <!--操作选项结束-->
    <!--列表开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
        <tr class="table_list_title">
            <td style="width: 2%">
                <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'jobid')" />
            </td>
            <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=ConfigID&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                编号
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LanguageVer&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                选项名称
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=WebsiteName&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                选项类型
            </td>
            <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                排序号
            </td>
            <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                创建人
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                创建时间
            </td>
            <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&txtWebsiteName=&radIsClose=-1&page=1')" title="点击排序">
                状态
            </td>
        </tr>
        <?php foreach($list as $key=>$val) : ?>
            <tr class="table_list_row_normal">
                <td style="width: 2%">
                    <input name="surveyitemid" type="checkbox" id="surveyitemid" value="<?php echo $val['surveyitemid'];?>"  />
                </td>
                <td style="width: 5%" >
                    <?php echo $val['surveyitemid']?>
                </td>
                <td style="width: 10%" >
                    <a href="<?php echo site_url('survey/surveyitem_add').'/'.$val['surveyitemid'];?>">
                        <?php echo $val['itemname']?>
                    </a>
                </td>
                <td style="width: 10%" >
                    <?php
                    if($val['typeid'] == 1){
                        echo '单选';
                    }elseif($val['typeid'] == 2){
                        echo '多选';
                    }elseif($val['typeid'] == 3){
                        echo '文本';
                    }
                    ?>
                </td>
                <td style="width: 5%" >
                    <?php echo $val['listid']?>
                </td>
                <td style="width: 5%" >
                    <?php echo $val['adminname']?>
                </td>
                <td style="width: 10%" >
                    <?php echo $val['addtime']?>
                </td>
                <td style="width: 5%" >
                    <?php
                    if($val['isclose'] == 0){
                        echo '开放';
                    }elseif($val['isclose'] == 1){
                        echo '<font color="red">关闭</font>';
                    }
                    ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <?php $pagination->show();?>
    <script src="/static/bk/js/table.js" type="text/javascript"></script>
<?php $this->load->view('layout/footer'); ?>